<!--
 * @Author: wangzhichiao<https://github.com/wzc570738205>
 * @Date: 2020-05-26 13:47:26
 * @LastEditors: wangzhichiao<https://github.com/wzc570738205>
 * @LastEditTime: 2020-05-29 10:25:21
 -->
<template>
  <el-form
    :model="formModel"
    ref="step1Config"
    size="small"
    label-width="120px"
    class="add-form"
  >
<!--     <el-form-item
      label="表单组"
      prop="groupName"
      :rules="[{ required: true, message: '请选择表单组', trigger: 'blur' }]"
    >
      <el-select v-model="formModel.groupName" :disabled="isView">
        <el-option
          v-for="item in genderOptions"
          :key="item.key"
          :label="item.value"
          :value="item.key"
        >
        </el-option>
      </el-select>
    </el-form-item> -->
    <el-form-item
      label="表单名称"
      prop="formName"
      :rules="[
        { required: true, message: '请输入表单名称', trigger: 'blur' },
        { min: 1, max: 20, message: '表单名称1-20位' }
      ]"
    >
      <el-input v-model="formModel.formName" :readonly="isView"></el-input>
    </el-form-item>
    <el-form-item
      label="表单编码"
      prop="code"
      :rules="[
        { required: true, message: '请输入表单编码', trigger: 'blur' },
        { min: 1, max: 20, message: '表单编码1-20位' }
      ]"
    >
      <el-input v-model="formModel.code" :readonly="isView"></el-input>
    </el-form-item>
    <el-form-item label="描述" prop="description">
      <el-input
        type="textarea"
        :autosize="{ minRows: 2, maxRows: 4 }"
        v-model="formModel.description"
        :readonly="isView"
      ></el-input>
    </el-form-item>
  </el-form>
</template>

<script>
export default {
  name: '',
  components: {},
  props: {
    baseSeting: {
      type: Object,
      required: true,
      default: () => {}
    }
  },
  data() {
    return {
      formModel: {},
      genderOptions: [
        { key: 0, value: '基础平台' },
        { key: 1, value: '综治' },
        { key: 2, value: '城管' }
      ],
      scopeOptions: [
        { key: 1, value: '综治' },
        { key: 2, value: '城管' },
        { key: 3, value: '综合展示平台' }
      ]
    }
  },
  watch: {
    baseSeting: {
      handler(newValue, oldValue) {
        this.formModel = newValue
      },
      deep: true,
      immediate: true
    }
  },
  created() {},
  mounted() {},
  methods: {}
}
</script>

<style lang="scss" scoped></style>
